﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">
<!-- 下拉框 -->
<link rel="stylesheet" href="static/ace/css/chosen.css" />
<!-- jsp文件头和头部 -->
<%@ include file="../index/top.jsp"%>
<!-- 日期框 -->
<link rel="stylesheet" href="static/ace/css/datepicker.css" />
</head>
<body class="no-skin">

	<!-- /section:basics/navbar.layout -->
	<div class="main-container" id="main-container">
		<!-- /section:basics/sidebar -->
		<div class="main-content">
			<div class="main-content-inner">
				<div class="page-content">
					<div class="row">
						<div class="col-xs-12">
						
						<!-- 检索  -->
						<form action="order/listOrders.do" method="post" name="goodsForm" id="goodsForm">
						<input type="hidden" name="classIds" id="classIds" value="${classIds}"/>
						<table style="margin-top:5px;">
							<tr>
								<td>
									<div class="nav-search">
									<span class="input-icon">
										<input class="nav-search-input" autocomplete="off" id="keywords" type="text" name="keywords" value="${pd.keywords}" placeholder="这里输入订单编号" />
										<i class="ace-icon fa fa-search nav-search-icon"></i>
									</span>
									</div>
								</td>
								<td>
									<div class="nav-search">
									<span class="input-icon">
										<input class="nav-search-input" autocomplete="off" id="phone" type="text" name="phone" value="${pd.phone}" placeholder="这里输入手机号" />
										<i class="ace-icon fa fa-search nav-search-icon"></i>
									</span>
									</div>
								</td>
								<%-- <td style="vertical-align:top;padding-left:2px;">
								 	<select class="chosen-select form-control" name="state" id="state" data-placeholder="状态" style="vertical-align:top;width: 120px;">
									<option value="">全部</option>
									<option value="01" <c:if test="${pd.state=='01'}">selected</c:if>>上架</option>
									<option value="00" <c:if test="${pd.state=='00'}">selected</c:if>>下架</option>
								  	</select>
								</td> --%>
								<c:if test="${QX.cha == 1 }">
								<td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="searchs();"  title="检索"><i id="nav-search-icon" class="ace-icon fa fa-search bigger-110 nav-search-icon blue"></i></a></td>
								</c:if>
								<%-- <c:if test="${QX.toExcel == 1 }"><td style="vertical-align:top;padding-left:2px;"><a class="btn btn-light btn-xs" onclick="toExcel();" title="导出到EXCEL"><i id="nav-search-icon" class="ace-icon fa fa-download bigger-110 nav-search-icon blue"></i></a></td></c:if> --%>
							</tr>
						</table>
						<!-- 检索  -->
					
						     <table id="simple-table" class="table table-striped table-bordered table-hover"  style="margin-top:5px;">
							  <thead>
							  
								<tr>
								  <th class="center" style="width:35px;">
									<label class="pos-rel"><input type="checkbox" class="ace" id="zcheckbox" /><span class="lbl"></span></label>
									</th>
									<th class="center" style="width:50px;">排序</th>
									<th class="center">订单编号</th>
									<th class="center">商品总价</th>
									<th class="center">实际付款金额</th>
									<th class="center">成交时间</th>
									<th class="center">付款时间</th>
                                    <th class="center">提交时间</th> 
                                    <th class="center">状态</th> 
								</tr>
							</thead>
													
							<tbody id="orderlist">
							<!-- 开始循环 -->	
							<c:choose>
								<c:when test="${not empty orderList}">
									<c:if test="${QX.cha == 1 }">
									<c:forEach items="${orderList}" var="order" varStatus="vs">
												
										<tr>
										 <td class='center' style="width: 30px;">
												<label><input type='checkbox' name='ids' value="${order.id }" id="${order.id }"  class="ace"/>
												<span class="lbl"></span></label>
											</td>
											<td class='center' style="width: 30px;">${vs.index+1}</td>
											<td class="center">${order.code }</td>
											<td class="center">${order.totalPrice }</td>
										    <td class="center">${order.realPrice }</td>
											<td class="center">${order.closingTime }</td>
                                            <td class="center">${order.payTime }</td>
                                            <td class="center">${order.createTime }</td>
                                            <td class="center">
                                            <!-- 00-未付款;01-已付款;02-待发货;03-待收货;04-已完成;05-已取消;06-申请退款;07-已退款;08-申请退货;09-已退货 -->
	                                            <c:if test="${order.state=='00'}">未付款</c:if>
	                                            <c:if test="${order.state=='01'}">已付款</c:if>
	                                            <c:if test="${order.state=='02'}">待发货</c:if>
	                                            <c:if test="${order.state=='03'}">待收货</c:if>
	                                            <c:if test="${order.state=='04'}">已完成</c:if>
	                                            <c:if test="${order.state=='05'}">已取消</c:if>
	                                            <c:if test="${order.state=='06'}">申请退款</c:if>
	                                            <c:if test="${order.state=='07'}">已退款</c:if>
	                                            <c:if test="${order.state=='08'}">申请退货</c:if>
	                                            <c:if test="${order.state=='09'}">已退货</c:if>
                                            </td>
										</tr> 
									</c:forEach>
									</c:if>
									<c:if test="${QX.cha == 0 }">
										<tr>
											<td colspan="15" class="center">您无权查看</td>
										</tr>
									</c:if>
								</c:when>
								<c:otherwise>
									<tr class="main_info">	
										<td colspan="15" class="center">没有相关数据</td>
									</tr>
								</c:otherwise>
							</c:choose>
							</tbody>
						</table>
					</form>
	
						</div>
						<!-- /.col -->
					</div>
					<!-- /.row -->
				</div>
				<!-- /.page-content -->
			</div>
		</div>
		<!-- /.main-content -->

		<!-- 返回顶部 -->
		<a href="#" id="btn-scroll-up" class="btn-scroll-up btn btn-sm btn-inverse">
			<i class="ace-icon fa fa-angle-double-up icon-only bigger-110"></i>
		</a>

	</div>
	<!-- /.main-container -->

	<!-- basic scripts -->
	<!-- 页面底部js¨ -->
	<%@ include file="../index/foot.jsp"%>
	<!-- 删除时确认窗口 -->
	<script src="static/ace/js/bootbox.js"></script>
	<!-- ace scripts -->
	<script src="static/ace/js/ace/ace.js"></script>
	<!-- 日期框 -->
	<script src="static/ace/js/date-time/bootstrap-datepicker.js"></script>
	<!-- 下拉框 -->
	<script src="static/ace/js/chosen.jquery.js"></script>
	<!--提示框-->
	<script type="text/javascript" src="static/js/jquery.tips.js"></script>
	</body>

<script type="text/javascript">
$(top.hangge());
//检索
function searchs(){
	top.jzts();
	$("#goodsForm").submit();
}
</script>
</html>
